package Calculator;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import Calculator.Add.CalculatorAddTest;

public class MyActionListener implements ActionListener{
    CalculatorAddTest ct;
    public MyActionListener(CalculatorAddTest ct) {
        this.ct = ct;
    }
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == ct.Equals) {
            ct.Result.setText(String.valueOf(Integer.parseInt(ct.Text1.getText()) + Integer.parseInt(ct.Text2.getText())));
        }
    }
}
